#include <REGX52.H>
#include "LCD1602.h"
#include "DS18B20.h"

void main(){
	float T;
	LCD1602_Init();
	
	while(1)
	{
		DS18B20_ConvertT();
		T=DS18B20_ReadT();
		if(T<0)
		{
			LCD1602_PrintString(1,1,"-");
			T=-T;
		}
		else
		{
			LCD1602_PrintString(1,1,"+");

		}
			LCD1602_PrintNum(1, 2, T, 3);
			LCD1602_PrintString(1,5,".");
			LCD1602_PrintNum(1, 6, (unsigned long)(T * 10000) % 10000, 4);
	}
}